home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000026_icon-group-sender _Mon Feb 7 08:17:47 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id IAA08396
for icon-group-addresses; Mon, 7 Feb 2000 08:16:27 -0700 (MST)
Message-Id: <200002071516.IAA08396@baskerville.CS.Arizona.EDU>
Date: Sun, 6 Feb 2000 23:57:50 -0200 (EDT)
From: Andrzej Solecki <andsol@mtm.ufsc.br>
To: icon-group@optima.CS.Arizona.EDU
Subject: factors.icn
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
I've imagined that such a program (call it `fct.icn') would behave
as nicely as FreeBSD `factor' command:
link factors
procedure main(args)
writes(args[1],": ")
every writes(!factors(args[1])," ")
write()
end
but it returns only one factor if the number has just two (distinct)
ones. Some numbers (like 99) are also discriminated. Is it a feature
or an unexpected feature of `factors.icn'? Or anything wrong about
the way the list is formed?
Besides, it chokes soon enough even when one of the factors
is reasonably small, say `./fct 33285' returns `33285 - 3 5 7'. Any
simple explanation, please? A quick look at `factors.icn' - at my level
of ignorance - does not furnish any clues :(
Andrzej Solecki